﻿<%@ Page Language="C#" MasterPageFile="~/webadmin/pages/MasterPage.master" AutoEventWireup="true" CodeFile="trangchu_cauhinh.aspx.cs" Inherits="webadmin_pages_trangchu_cauhinh" Title="Cấu hình trang chủ" %>
<%@ OutputCache Duration="1" VaryByParam="None" %>
<%@ Register Assembly="RadUpload.Net2" Namespace="Telerik.WebControls" TagPrefix="rad" %>
<%@ Register Assembly="RadEditor.Net2" Namespace="Telerik.WebControls" TagPrefix="rad" %>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder_Main" Runat="Server">
    <div class="content-box"><!-- Start Content Box -->
				
				<div class="content-box-header">
					
					<h3>
                        Thêm mới : <span style="color: #00cc00">một trang </span>
                    </h3>
	
				  <div class="clear"></div>
					
				</div> <!-- End .content-box-header -->
                <div class="content-box-content">
                
                <% if (!string.IsNullOrEmpty(messageError))
      {%>
			<div class="notification error png_bg">
				<a href="#" class="close"><img src="../resources/images/icons/cross_grey_small.png" title="Close this notification" alt="close" /></a>
				<div>
				Thông báo lỗi:  <b><i><%=messageError%></i></b></div>
			</div>
			<%} %>
                
                <p>
                    <label>Tiêu đề trang</label>
                    <asp:TextBox ID="txtTieuDe" runat="server" CssClass="text-input medium-input" Width="327px"></asp:TextBox>
                </p>
                <p>
                    <label > Danh sách banner hiện có </label>
                    <asp:DropDownList ID="cboListBanner" runat="server">
                    </asp:DropDownList><i>(Đây là hình đang được chọn và hiển thị)</i>
                </p>
                <p>
                    <label >Upload thêm banner mới</label>
                    <asp:FileUpload ID="txtHinhAnh" CssClass="text-input medium-input" runat="server" Width="390px" />
                </p>
                <p>
                    <label > Nội Dung footer:
                    <rad:RadEditor ID="txtNoiDung" runat="server"
                            BorderStyle="None" ConvertTagsToLower="True" ConvertToXhtml="False" DocumentsFilters="*.doc,*.docx,*.xls,*.xlsx,*.pdf,*.txt,*.ppt,*.pptx,*.prc"
                            EnableClientSerialize="True" EnableContextMenus="True" EnableDocking="False" EnableEnhancedEdit="True"
                            EnableHtmlIndentation="True" EnableServerSideRendering="True" EnableTab="True"
                            ImagesFilters="*.gif,*.png,*.jpg,*.jpeg,*.bmp"
                            MediaFilters="*.swf"
                            OnClientCancel="" OnClientCommandExecuted="" OnClientCommandExecuting="" OnClientInit=""
                            OnClientLoad="" OnClientModeChange="" OnClientSubmit="" PassSessionData="True"
                            RenderAsTextArea="False" Skin="Web20" SpellEditDistance="1"
                            ToolbarMode="Default" ToolsWidth="" DeleteDocumentsPaths="../Uploads/Delete" DeleteFlashPaths="../Uploads/Delete" DeleteImagesPaths="../Uploads/Delete" DeleteMediaPaths="../Uploads/Delete" DeleteTemplatePaths="../Uploads/Delete" DocumentsPaths="../Uploads/Documents" FlashPaths="../../Uploads/Flashs" ImagesPaths="../../Uploads/Images" MediaPaths="../../Uploads/Flashs" SaveInFile="True" ShowSubmitCancelButtons="False" UploadDocumentsPaths="../../Uploads/Documents" UploadFlashPaths="../../Uploads/Flashs" UploadImagesPaths="../../Uploads/Images" UploadMediaPaths="../../Uploads/Flashs" UseClassicDialogs="True" Width="100%" ImagesPathToStrip="../../Uploads/Images" MaxDocumentSize="5242880" MaxFlashSize="5242880" MaxImageSize="5242880" Height="250px">
                        </rad:RadEditor>
                    </label>
                        </p>
                    <p>
                        <label>Block Right:</label>
                        bảng cung cầu:<asp:CheckBox ID="chkBangCungCau" runat="server"/>
                        hỗ trợ trực tuyến:<asp:CheckBox ID="chkHoTroTrucTuyen" runat="server"/>
                        Thống kê:<asp:CheckBox ID="chkThongKe" runat="server"/>
                        Liên kết quảng cáo:<asp:CheckBox ID="chkLienKet" runat="server"/></p>
                    <p>
                        <label>Block center:<asp:DropDownList ID="cboCenter" runat="server"></asp:DropDownList> 
                            Thứ tự:<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtOrderCenter"
                                ErrorMessage="(*)" ValidationGroup="Center"></asp:RequiredFieldValidator>
                            <asp:TextBox ID="txtOrderCenter" runat="server" Width="58px"></asp:TextBox>
                            <asp:Button CssClass="button" ID="btnAddCenter" runat="server" Text="Thêm" OnClick="btnAddCenter_Click" ValidationGroup="Center" UseSubmitBehavior="False" CommandArgument="addblock"/>
                        </label>
                        <table style="border:1px solid blue;width:100%;line-height:30px;">
                            <thead style="background:#ddd; text-align:center"><th style="width:50%">Block</th><th style="text-align:center;">thứ tự</th><th style="text-align:center;">action</th></thead>
                            <%
                                aCenter = (string[])Session["aCenter"];
                                if (aCenter!=null && aCenter.Length > 0)
                                {
                                    for (int i = 0; i < aCenter.Length; i++)
                                    {
                                        aSub = aCenter[i].Split('-');
                            %>
                            <tr>
                            <td style="border-bottom:1px dotted #000;padding-left:5px;"><%=aSub[1].ToString() %></td>
                            <td style="text-align:center;border-bottom:1px dotted #000;border-left:1px solid #000;border-right:1px solid #000;"><%=aSub[2].ToString() %></td>
                                <%if (id == "")
                                  { %>
                                <td style="text-align:center;border-bottom:1px dotted #000;"><a href="trangchu_cauhinh.aspx?act=<%=act %>&acts=center&idb=<%=i%>">Xóa</a></td>
                                <%}
                                  else
                                  { %>   
                                  <td style="text-align:center;border-bottom:1px dotted #000;"><a href="trangchu_cauhinh.aspx?act=<%=act %>&id=<%=id %>&acts=center&idb=<%=i%>">Xóa</a></td>
                                <%} %>
                                </tr>
                            <%  }
                                    }%>
                        </table>
                    </p>
                    
                    <p style="border-top:2px double #ccc;">
                        <label>Block đôi ở giữa:</label>
                        Bên trái: <asp:DropDownList ID="cboCenterDoubleLeft" runat="server"></asp:DropDownList> 
                        Bên phải: <asp:DropDownList ID="cboCenterDoubleRight" runat="server"></asp:DropDownList>
                        Thứ tự:<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtOrderCenterDouble"
                            ErrorMessage="(*)" ValidationGroup="CenterDouble"></asp:RequiredFieldValidator>
                        <asp:TextBox ID="txtOrderCenterDouble" runat="server" Width="58px"></asp:TextBox>
                        <asp:Button CssClass="button" ID="btnAddCenterDouble" runat="server" Text="Thêm" OnClick="btnAddCenterDouble_Click" ValidationGroup="CenterDouble" UseSubmitBehavior="False"/>
                        <br />
                        <table style="border:1px solid blue;width:100%;line-height:30px;">
                            <thead style="background:#ddd; text-align:center">
                                <th style="width:50%">Block trái</th>
                                <th>Block phải</th>
                                <th style="text-align:center;">thứ tự</th>
                                <th style="text-align:center;">action</th>
                            </thead>
                            <%
                                aCenterDouble = (string[])Session["aCenterDouble"];
                                if (aCenterDouble!=null && aCenterDouble.Length > 0)
                                {
                                    for (int i = 0; i < aCenterDouble.Length; i++)
                                    {
                                        aSub = aCenterDouble[i].Split('-');
                            %>
                            <tr>
                            <td style="padding-left:5px;"><%=aSub[0].ToString() %></td>
                            <td style="border-left:1px solid #000;padding-left:5px;"><%=aSub[1].ToString() %></td>
                            <td style="text-align:center;border-left:1px solid #000;"><%=aSub[2].ToString() %></td>
                            <%if (id == "")
                                  { %>
                                <td style="text-align:center;border-left:1px solid #000;"><a href="trangchu_cauhinh.aspx?act=<%=act %>&acts=centerdouble&idb=<%=i%>">Xóa</a></td>
                                <%}
                                  else
                                  { %>   
                                  <td style="text-align:center;border-left:1px solid #000;"><a href="trangchu_cauhinh.aspx?act=<%=act %>&id=<%=id %>&acts=centerdouble&idb=<%=i%>">Xóa</a></td>
                                <%} %>
                                </tr>
                            <%  }
                                    }%>
                        </table>
                    </p>
                    <p>
                     <asp:Button CssClass="button" ID="btnOk" runat="server" Text="Lưu Thông Tin" OnClick="btnOk_Click" ValidationGroup="Full" />&nbsp;
                        <asp:Button CssClass="button" ID="btnCancel" runat="server" Text="Hủy" OnClick="btnCancel_Click" ValidationGroup="Full" /><a href="TaoTrang_list.aspx"></a>
                    </p>
    
                 </div>
                 </div>
</asp:Content>

